<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../lib/animate.css/animate.min.css">
    <style>
        #bigbox{
            width: 180px;
            height: 260px;
            margin: 100px auto;
            position: relative;
            transform: rotateX(0deg);
            transform-style: preserve-3d;
            perspective: 2800px;

        }
        #bigbox>div{
            width: 180px;
            height: 260px;
            position: absolute;
            left:0;
            top:0;
            transform: rotateY(0deg);
            
        }
       img{
                width: 180px;
                height:260px;
        }
        p{
            text-align: center;
        }
        #bth{
            width: 70px;
            height: 37px;
        }
    </style>
</head>
<body>
   <div id="bigbox">
       <div>
           <img src="img/image (1).png" alt="">
        </div>
        
        <div >
            <img src="img/image (24).png" alt="">
        </div>
        <div>
            <img src="img/image (10).png" alt="">
        </div>
        <div>
            <img src="img/image (25).png" alt="">
        </div>
        <div>
            <img src="img/image (4).png" alt="">
        </div>
        <div>
            <img src="img/image (8).png" alt="">
        </div>
        <div>
            <img src="img/image.png" alt="">
        </div>
        <div>
            <img src="img/image2.png" alt="">
        </div>
        <div>
            <img src="img/image3.png" alt="">
        </div>
        <div>
            <img src="img/image4.png" alt="">
        </div>
   </div>
   <p>
       <button id="bth">
       点击旋转 
       </button>
    </p>
   
</body>
<script>
    var divall = document.querySelectorAll('#bigbox div');
    console.log(divall)
    
    var button = document.querySelector('p #bth');console.log(button)
    console.log(divall.length);
    for(var i=0;i<divall.length; i++){
        divall[i].style.transform = 'rotateY('+360/divall.length*i+'deg) translateZ(600px)';
    }
    var numbber = 0 ;
    button.onclick = function(){
        numbber++;
        for(var i=0;i<divall.length; i++ ){
            divall[i].style.transition = '2s';
        divall[i].style.transform = 'rotateY('+(360/divall.length*i+360/divall.length*numbber)+'deg) translateZ(600px)';
        }
    }
</script>
</html>